package com.wt.struggle.goodbye.info

import android.os.Parcel
import android.os.Parcelable

class VideoInfo() : Parcelable {

    var domainname: String = ""
    var path: String = ""
    var pathThumb: String = ""
    var id: Int = 0

    var width: Int = 0
    var height: Int = 0
    var createtime:Long=0

    constructor(parcel: Parcel) : this() {
        domainname = parcel.readString()
        path = parcel.readString()
        pathThumb = parcel.readString()
        id = parcel.readInt()
        width = parcel.readInt()
        height = parcel.readInt()
        createtime = parcel.readLong()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(domainname)
        parcel.writeString(path)
        parcel.writeString(pathThumb)
        parcel.writeInt(id)
        parcel.writeInt(width)
        parcel.writeInt(height)
        parcel.writeLong(createtime)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<VideoInfo> {
        override fun createFromParcel(parcel: Parcel): VideoInfo {
            return VideoInfo(parcel)
        }

        override fun newArray(size: Int): Array<VideoInfo?> {
            return arrayOfNulls(size)
        }
    }


}